import time
from threading import Thread


def sing():
    """模拟唱歌5秒钟
    """
    for i in range(5):
        print("-----正在唱歌----> %d" % i)
        time.sleep(1)


def dance():
    """模拟跳舞5秒钟
    """
    for i in range(5):
        print("-----正在跳舞----> %d" % i)
        time.sleep(1)


def main():
    t1 = Thread(target=sing)  # 创建一个线程
    t2 = Thread(target=dance)
    
    t1.start()  # 启动线程
    t2.start()
    

if __name__ == '__main__':
    main()
    